﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;

namespace Sherwood.Samples.ClientWebsite.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewData["Message"] = "Welcome to ASP.NET MVC!";

            string serverVars = "";
            foreach (string key in Session.Keys)
            {
                if (key.StartsWith("SIGNON_"))
                {
                    serverVars += key.Replace("SIGNON_", "") + ": " + Session[key] + "<br/>";
                }
            }

             foreach (string key in Request.Headers.AllKeys)
            {

                    serverVars += key.Replace("SIGNON_", "") + ": " + Request.Headers[key] + "<br/>";

            }


            ViewData["ServerVariables"] = serverVars;



            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
